<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>节点操作</title>
    <style>
        .boxId {
            background-color: pink;
            width: 300px;
            height: 300px;
        }
    </style>
    <script src="../../jquery-js/jquery.js"></script>
    <script>
        $(function () {
            let $point=$('<a href="https://www.weibo.com" target="_blank">微博</a>');
            // $('.boxId').append('<a href="https://www.weibo.com" target="_blank">微博</a>');
            $point.appendTo('.boxId');

            $('.boxId').prepend($('p'));
            $('p').prependTo($('div'));

            $point.before('<h1>我是百度</h1>');
            $point.after('<p>我是微博</p>')
        })
    </script>
</head>
<body>
<div class="boxId"></div>
<p>我是内容</p>
</body>
</html>